<script type="text/javascript" src="../js/bdMap.js"></script>
<div style="width:100%;height:200px;">
    <table id="admin_shebei_info" data-options="fit:true"></table>
    <div id="shebei_info_toolbar" style="padding:0 10px; height:35px;line-height:35px;">
		<input class="icon-reload" type="button" value="刷新" onclick="flushAdd()"
			style="padding:3px 3px 3px 20px;border:1px #999 solid;margin:2px;border-radius:5px;"/>
	</div>
</div>
<script type="text/javascript">
$(function(){
	$('#admin_shebei_info').datagrid({
		url:'../expenseInfoServlet?t='+new Date(),
		queryParams:{op:"getAllConsume"},
		loadMsg:'数据加载中...',
		fitColumns:true,
		rownumbers:true,
		striped:true,
		sortName:'lid',
		sortOrder:'asc',
		remoteSort:false,
		columns:[[
			{field:'lid',title:'编号',width:100,align:'center',sortable:true},
			{field:'sid',title:'设备编号',width:100,align:'center'}, 
			{field:'sname',title:'设备名称',width:100,align:'center'}, 
			{field:'stype',title:'设备类型',width:100,align:'center'}, 
			{field:'laddr',title:'设备位置',width:200,align:'center'}, 
			{field:'lstatus',title:'设备状态',width:100,align:'center'},
			{field:'_operate',title:'操作',width:100,align:'center',formatter:function(value, rowData, index){
				return "<a class='icon-file icon-padding' href=\"javascript:showInMap('"+value+"')\">在地图上显示</a>";
			}
		}
		toolbar:"#shebei_info_toolbar"
	});
});

function addSebeiInfo() {
	var sid=$("add_sid").val();
	var aname=$("add_sname").val();
	var lng=$("add_lng").val();
	var lat=$("add_lat").val();
}

</script>
<div id="allmap" style="width:100%;height:100%;overflow:hidden;"></div>
<div id="searchResultPanel" style="border:1px solid #C0C0C0;width:150px;height:auto; display:none;"></div>
<div id="add_shebei_info" class="easyui-dialog" title="添加设备位置信息" style="width:400px;height:280px;"
	data-options="iconCls:'icon-add',resizable:true,modal:true,closed:true">
	<p style="width:100%;text-align:center;">
		<br /> <br /> 
		<label for="add_sid">设备编号：</label><input type="text" id="add_sid">
		<br /> <br /> 
		<label for="add_sname">设备名称：</label><input type="text" id="add_sname">
		<br /> <br />
		<label for="add_lng">经度：</label><input type="text" id="add_lng">
		<br /> <br />
		<label for="add_lat">纬度：</label><input type="text" id="add_lat">
		<br /> <br />
		<input style="padding:5px 25px;" type="button" onclick="addShebeiInfo()" value="添&nbsp;&nbsp;&nbsp;&nbsp;加">
	</p>
</div>